package com.dragon.manage.service;

import com.alibaba.fastjson.JSONObject;


public interface IManageNewsService {
	
	/**
	 * 查询新闻列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public JSONObject queryNewsList(int page)  throws Exception;
	
	public JSONObject deleteNews(int newid)  throws Exception;
	
	public JSONObject getNewsInfo(int newid)  throws Exception;
	/**
	 * 新建一条新闻
	 * @param title
	 * @param content
	 * @param coveraddress
	 * @param newstype
	 * @param h5url
	 * @param newsTypeidArr
	 * @return
	 * @throws Exception
	 */
	public JSONObject saveNews(String title,String content,String coveraddress,
			int newstype,String h5url)  throws Exception ;
	
	/**
	 * 更新新闻
	 * @param newid
	 * @param title
	 * @param content
	 * @param coveraddress
	 * @param newstype
	 * @param h5url
	 * @return
	 * @throws Exception
	 */
	public JSONObject updateNews(int newid,String title, String content,
			String coveraddress, int newstype, String h5url)  throws Exception ;
	/**
	 * 保存新闻类型
	 * @param typename
	 * @param typedesc
	 * @param logoaddress
	 * @param parentid
	 * @return
	 * @throws Exception
	 */
	public JSONObject saveNewsType(String typename, String typedesc,
			String logoaddress, int parentid)  throws Exception ;
	/**
	 * 更新新闻类型
	 * @param typeid
	 * @param typename
	 * @param typedesc
	 * @param logoaddress
	 * @param parentid
	 * @return
	 * @throws Exception
	 */
	public JSONObject updateNewsType(int typeid,String typename, String typedesc,
			String logoaddress, int parentid)  throws Exception ;
	
	/**
	 * 删除新闻类型
	 * @param typeid
	 * @return
	 * @throws Exception
	 */
	public JSONObject deleteNewsType(int typeid)  throws Exception ;
	
	/**
	 * 查询新闻列表
	 * @param typeid
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public JSONObject queryNewsTypeList(int typeid)  throws Exception ;
	
	
	/**
	 * 添加一条评论
	 * @param comment
	 * @param userid
	 * @param commentators
	 * @param parentid
	 * @param newid
	 * @return
	 * @throws Exception
	 */
	public JSONObject saveNewsDiscussRela(String comment, int userid,
			 int parentid, int newid)  throws Exception ;
	/**
	 * 删除一条评论
	 * @param discussid
	 * @return
	 * @throws Exception
	 */
	public JSONObject deleteNewsDiscussRela(int discussid)  throws Exception ;
	
	/**
	 * 查询评论列表
	 * @param discussid
	 * @param userid
	 * @param parentid
	 * @param newid
	 * @return
	 * @throws Exception
	 */
	public JSONObject queryNewsDiscussRelaList(int discussid, int userid,
			int parentid, int newid,int page)  throws Exception ;
	
	/**
	 * 保存banner
	 * @param bannername
	 * @param coveraddress
	 * @param h5url
	 * @param newid
	 * @param matchid
	 * @param position
	 * @return
	 * @throws Exception
	 */
	public JSONObject saveBanner(String bannername, String coveraddress,
			String h5url, int newid, int matchid, int position,int bannertype)  throws Exception ;
	
	/**
	 * 更新banner条
	 * @param bannerId
	 * @param bannername
	 * @param coveraddress
	 * @param h5url
	 * @param newid
	 * @param matchid
	 * @param position
	 * @param bannertype
	 * @return
	 * @throws Exception
	 */
	public JSONObject updateBanner(int bannerId,String bannername, String coveraddress,
			String h5url, int newid, int matchid, int position,int bannertype)  throws Exception ;
	
	/**
	 * 删除
	 * @param bannerId
	 * @return
	 * @throws Exception
	 */
	public JSONObject deleteBanner(int bannerId)  throws Exception ;
	
	/**
	 * 查询导航条列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public JSONObject queryBannerList(int page,int bannerId)  throws Exception ;
}
